<template xmlns="http://www.w3.org/1999/html">
  <sea-data-table ref="tableObject" url="/kettle/channel/log/page" :auto-load="false">
    <!--表头-->
    <sea-table-header slot="header" disabled-form>
      <!--标题栏-->
      <sea-table-title slot="title" title="通道日志" subtitle="Kettle详细的执行过程"></sea-table-title>

      <!--按钮-->
      <template slot="buttons">
        <el-button icon="fa fa-indent" title="树形展示"></el-button>
      </template>
    </sea-table-header>

    <!--表头-->
    <template slot="columns">
      <el-table-column property="parentChannelId" label="父级通道ID" width="180"></el-table-column>
      <el-table-column property="channelId" label="通道ID" width="180"></el-table-column>
      <el-table-column property="logDate" label="日志日期" width="180"></el-table-column>
      <el-table-column property="loggingObjectType" label="对象类型" width="180"></el-table-column>
      <el-table-column property="objectName" label="对象名称" width="180"></el-table-column>
      <el-table-column property="filename" label="文件名" width="180"></el-table-column>
    </template>
  </sea-data-table>
</template>

<script>
export default {
    components: {}
    , name: 'ChannelLogList'
    , props: {
        // 作业ID
        guid: {type: String, default: undefined}
    }
    , watch: {
        guid: {
            handler: function (val) {
                this.reload(val);
            }
        }
    }
    , methods: {
        /**
         * 重新加载数据
         *
         * @param id 查询参数
         */
        reload: function (id) {
            this.$refs.tableObject.reload({idBatch: id});
        }
    }
}
</script>
